<?php
/**
 * Created by PhpStorm.
 * User: xiaoxin
 * Date: 2018/10/16 0016
 * Time: 10:21
 */

/**
 * 继承类练习
 * Class animal
 */
class animal{
	public $name ;
	public function run(){
		echo $this->name.PHP_EOL;
	}
}
class Dogs extends animal {
	public $name = 'Dog';
}
class Cats extends animal {
	public $name = 'Cat';
}
$Dog = new Dogs();
$Dog->run();
$Cat = new Cats();
$Cat->run();
